package com.example.book_recommend.service.impl;

import com.example.book_recommend.dao.SysTokenMapper;
import com.example.book_recommend.entity.SysToken;
import com.example.book_recommend.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TokenServiceImpl implements TokenService {
    @Autowired
    private SysTokenMapper sysTokenMapper;

    @Override
    public SysToken findToken(String token) {
        return sysTokenMapper.selectByToken(token);
    }

    @Override
    public void addToken(SysToken token) {
        sysTokenMapper.insert(token);
    }
}
